#ifndef cgal_h
#define cgal_h

#ifdef __cplusplus
extern "C" {
#endif

void PASetNewPA (int id);
void PASetNewPoly (char is_bound);
void PASetNewBound ();
void PASetNewPoint (double x, double y);
void PASetEndBound ();
void PASetEndPoly ();
void PASetEndPA ();

int PAGetNPoly (int id);
char PAGetIsBound (int id, int ipoly);

int PAGetOutterBoundNPoint (int id, int ipoly);
double PAGetOBX (int id, int ipoly, int iv);
double PAGetOBY (int id, int ipoly, int iv);

int PAGetNHole (int id, int ipoly);
void PAIterateHoleBegin (int id, int ipoly);
void PAIterateHoleNext (); 
int PAIterateHoleIsContinue ();
int PAGetHoleNPoint ();
double PAGetHoleX (int iv);
double PAGetHoleY (int iv);

void PADiff (int pa1, int pa2, int res);
void PAUnion (int pa1, int pa2, int res);
void PAInter (int pa1, int pa2, int res);

void PAPrint (char * fout_name, int pa);

#ifdef __cplusplus
}
#endif

#endif
